import request from '@/utils/request'

// 查询课件/课程列表
export function listCourseware(query) {
  return request({
    url: '/courseware/searchCourseware',
    method: 'post',
    data: query
  })
}

// 查询课件/课程详细
export function getCourseware(tvCoursewareId) {
  return request({
    url: '/courseware/getInfo/' + tvCoursewareId,
    method: 'get'
  })
}

// 新增课件/课程
export function addCourseware(data) {
  return request({
    url: '/courseware',
    method: 'post',
    data: data
  })
}

// 修改课件/课程
export function updateCourseware(data) {
  return request({
    url: '/courseware/edit',
    method: 'put',
    data: data
  })
}

// 删除课件/课程
export function delCourseware(tvCoursewareId) {
  return request({
    url: '/courseware/' + tvCoursewareId,
    method: 'get'
  })
}
